<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/css/page/lab_appointment_manage.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>报修评分</span>
        </div>
        <!-- 卡片区域  -->
        <div class="layui-card-body">
            <!-- 搜索区域   -->
            <form class="layui-form" id="form_search">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">上报时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="submit_time" placeholder="请输入上报时间" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <div style="margin-left: 10px;">
                        <button class="layui-btn btn_search" lay-submit lay-filter="formDemo">搜索</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col width="50"> 
                    <col width="50"> 
                    <col width="50"> 
                    <col width="50"> 
                    <col width="200"> 
                    <col width="70"> 
                    <col width="50"> 
                    <col width="100"> 
                    <col width="50"> 
                    <col width="50"> 
                    <col width="50"> 
                </colgroup>
                <thead>
                    <tr>
                        <th>姓名</th>
                        <th>楼栋</th>
                        <th>宿舍号</th>
                        <th>报修类型</th>
                        <th>报修内容</th>
                        <th>上报时间</th>
                        <th>报修图片</th>
                        <th>维修状态</th>
                        <th>宿管回复</th>
                        <th>操作</th>
                        <th>服务评分</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
            <div class="repair-container">
                <h3 class="repair-title">报修类型说明</h3>
                
                <div class="repair-category">
                    <span class="category-title">1. 水电类</span>
                    <div class="tag-list">
                        <span class="tag">水龙头漏水</span>
                        <span class="tag">水管破裂或漏水</span>
                        <span class="tag">电灯不亮或闪烁</span>
                        <span class="tag">插座失灵</span>
                        <span class="tag">停电问题</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">2. 五金类</span>
                    <div class="tag-list">
                        <span class="tag">门锁卡顿或损坏</span>
                        <span class="tag">窗户损坏</span>
                        <span class="tag">床、桌椅损坏</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">3. 墙面和地面</span>
                    <div class="tag-list">
                        <span class="tag">墙面裂缝或脱落</span>
                        <span class="tag">地面瓷砖损坏</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">4. 卫生设施</span>
                    <div class="tag-list">
                        <span class="tag">厕所堵塞</span>
                        <span class="tag">洗手台损坏</span>
                        <span class="tag">下水道堵塞</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">5. 电器类</span>
                    <div class="tag-list">
                        <span class="tag">空调故障</span>
                        <span class="tag">风扇故障</span>
                        <span class="tag">热水器故障</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">6. 网络类</span>
                    <div class="tag-list">
                        <span class="tag">网络插口故障</span>
                        <span class="tag">网络连接问题</span>
                    </div>
                </div>
            
                <div class="repair-category">
                    <span class="category-title">7. 其他</span>
                    <div class="tag-list">
                        <span class="tag">洗浴热水系统故障</span>
                        <span class="tag">公共区域设施损坏</span>
                        <span class="tag">天花板漏水</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- ---------------------------------------------------------------- -->

    <!-- ---------------------------------------------------------------- -->
    <script src="../lib/OSL/jquery.js"></script>
    <script src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/js/page/fix_my.js"></script>
    <script src="../lib/OSL/template-web.js"></script>

     <!-- 获取所有用户数据的表格模板 -->
     <script type="text/html" id="tpl-table">
        {{each data}}
        {{if $value.status_fix ==3}}  
        <tr >
            <td>{{$value.sno_name}}</td>
            <td>{{$value.floor}}</td>
            <td>{{$value.hostel}}</td>
            <!-- <td>{{$value.type_fix}}</td> -->
            {{if $value.type_fix ==1}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 80px; cursor:default;background-color: #3db5f2;">水电类</button>
            </td>
            {{else if $value.type_fix ==2}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 80px;cursor:default;background-color: #efd931;">五金类</button>
            </td>
            {{else if $value.type_fix ==3}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 80px;cursor:default;background-color: #918787;">墙面和地面</button>
            </td>
            {{else if $value.type_fix ==4}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 80px;cursor:default;background-color: #edeaea;">卫生设施</button>
            </td>
            {{else if $value.type_fix ==5}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 80px;cursor:default;background-color: #2f2d2d;">其他</button>
            </td>
            {{/if}}  
            <td>{{$value.content}}</td>
            <td>{{$value.submit_time}}</td>
            <td>
                <img src="http:\\127.0.0.1:3001{{$value.picture}}" alt="">
                <button type="button" class="layui-btn layui-btn-sm btn_viewDevice" data_id="{{$value.picture}}"
                style="background-color: #EF476F">查看图片</button>
            </td>
            <!-- <td>{{$value.status}}</td> -->
            {{if $value.status_fix ==1}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="cursor:default;background-color: #d9282e;">未处理</button>
            </td>
            {{/if}}  
            {{if $value.status_fix ==2}}  
            <td>
                <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" disabled="true"
                style="cursor:default;background-color: #2ce6e6;">维修中</button>
            </td>
            {{/if}}  
            {{if $value.status_fix ==3}}  
            <td>
                <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" disabled="true"
                style="cursor:default;background-color: #a4adf2;">维修完成</button>
            </td>
            {{/if}}  
            <td>{{$value.reply}}</td>
            <!-- <td>{{$value.mark}}</td> -->
            {{if $value.mark ==0}}
            <td>
                <button type="button" class="layui-btn layui-btn-sm btn_editLab" data_id="{{$value.id}}">评分</button>
            </td>
            {{else }}
            <td>
                <button type="button" class="layui-btn layui-btn-sm btn_editLab" disabled="true" style="cursor:default;background-color: #067a04;" >完成评分</button>
            </td>
            {{/if}}  
           
            {{if $value.mark ==1}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 50px;cursor:default;background-color: #1f1e1e;">极差</button>
            </td>
            {{else if $value.mark ==2}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 50px;cursor:default;background-color: #a59a9b;">差</button>
            </td>
            {{else if $value.mark ==3}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 50px;cursor:default;background-color: #98ea51;">中等</button>
            </td>
            {{else if $value.mark ==4}}
            <td>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn_fixUser" disabled="true"
                style="width: 50px;cursor:default;background-color: #e8d208;">好</button>
            </td>
            {{else}}
            <td>
              
            </td>
            {{/if}}  
            
        </tr>
        {{/if}}  
        {{/each}}
    </script>
      <!-- 根据id修改信息 -->
      <script type="text/html" id="dialog_editLab">
        <form class="layui-form" id="form_editLab" lay-filter="form_edit">
            <input type="hidden" name="id">
            <div class="layui-form-item">
                <label class="layui-form-label">评分</label>
                <div class="layui-input-block">
                    <input type="radio" name="mark" value="1" title="极差">
                    <input type="radio" name="mark" value="2" title="差">
                    <input type="radio" name="mark" value="3" title="中等">
                    <input type="radio" name="mark" value="4" title="好">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确认</button>
                </div>
            </div>
        </form>
    </script>

      <!-- 查看图片 -->
      <script type="text/html" id="tpl_view_device">
        <div name="view_device" id="view_device">
            <img src="http://127.0.0.1:3001{{picture}}" alt="此设备无图片">
        </div>
    </script>


</body>

</html>